<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表格演示</title>
</head>
<body>
    <p>表格是用来显示二维数据的重要标签</p>
    <p>表格标签是table，行标签是tr</p> 
    <p>表格标签的属性：border，设置边框的宽度</p>
    <p>后面不用border来设置边框的宽度</p>
    <hr>
    <p>构建两行三列的表格</p>
    <table border="3">
        <tr>
            <td>姓名</td>
            <td>性别</td>
            <td>年龄</td>
        </tr>
        <tr>
            <td>张三</td>
            <td>男</td>
            <td>18</td>
        </tr>
        <tr>
            <td>李四</td>
            <td>女</td>
            <td>19</td>
        </tr>
    </table>
    <hr>
    <p>构建含caption/thead/tboby/tfoot的表格 th标签显示单元格为表头,即加粗</p>
    <p>thead tboby tfoot 具有语义可排序</p>
    <p>colspan合并行单元格</p>
    <table border="3">
        <caption>学生信息表</caption>
        <thead>
            <tr>
                <th>序号</th>
                <th>姓名</th>
                <th>总分</th>
                <th>排名</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th>1</th>
                <td>张三</td>
                <td>100</td>
                <td>1</td>
            </tr>
            <tr>
                <th>2</th>
                <td>李四</td>
                <td>90</td>
                <td>2</td>
            </tr>
            <tr>
                <th>3</th>
                <td>王五</td>
                <td>80</td>
                <td>3</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <th>平均分</th>
                <td>90</td>
                <td colspan="2"></td>               
            </tr>
        </tfoot>

    </table>
    <hr>
    <p>表格列分组</p>
    <table border="3">
        <colgroup>
            <col span="2">
            <col span="2">
        </colgroup>
        <tr>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组2</td>
            <td>分组2</td>
        </tr>
        <tr>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组2</td>
            <td>分组2</td>
        </tr>
        <tr>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组2</td>
            <td>分组2</td>
        </tr>
    
    </table>
</body>
</html>